/**
 * Created By zhangQ 2018/2/27
 */

// 用户中心
// const userCenter = () => import(/* webpackChunkName: "containerPlatform/userCenter" */ '@views/containerPlatform/userCenter/userCenter')
const index = () => import(/* webpackChunkName: "containerPlatform" */ '@views/containerPlatform')
/* 集装箱管理 start */
// 集装箱到站预报
const containerLogisticsMonitoring = () => import(/* webpackChunkName: "containerPlatform/containerManagement" */ '@views/containerPlatform/containerManagement/containerLogisticsMonitoring')
const containerPlatformContainerList = () => import(/* webpackChunkName: "containerPlatform/containerManagement" */ '@views/containerPlatform/containerManagement/containerList')
const overTimeWarning = () => import(/* webpackChunkName: "containerPlatform/containerManagement" */ '@views/containerPlatform/containerManagement/overTimeWarning')
const overQuantityWarning = () => import(/* webpackChunkName: "containerPlatform/containerManagement" */ '@views/containerPlatform/containerManagement/overQuantityWarning')
const containerReport = () => import(/* webpackChunkName: "containerPlatform/containerManagement" */ '@views/containerPlatform/containerManagement/containerReport')
/* 集装箱管理 end */
let required = false
let routers = []
/* 前端首页根路由 */
let containerPlatformRouter = {
  path: '/container_platform',
  name: 'containerPlatform',
  icon: 'speedometer',
  component: index,
  props: true,
  redirect: '/container_platform/container_management',
  meta: { role: [], activeMenu: 'containerPlatform', title: '首页', required: required },
  children: []
}
/* 用户中心 star */
// let userCenterRouter = {
//   path: 'user_center', name: 'containerPlatformUserCenter', component: userCenter, icon: 'speedometer', hidden: true, meta: {role: [], activeMenu: 'containerPlatformUserCenter', title: '用户中心'}
// }
// containerPlatformRouter.children.push(userCenterRouter)
/* 用户中心 star */
/* 集装箱管理 star */
let containerManagementRouter = {
  path: 'container_management',
  name: 'containerManagement',
  redirect: 'container_management/container_logistics_monitoring',
  icon: 'android-list',
  meta: { activeMenu: 'containerManagement', title: '集装箱管理' },
  component: {
    render (c) {
      return c('router-view')
    }
  },
  children: [
    { path: 'container_logistics_monitoring', name: 'containerLogisticsMonitoring', icon: 'stats-bars', component: containerLogisticsMonitoring, meta: { activeMenu: 'containerLogisticsMonitoring', title: '箱情观察' } },
    {
      path: 'overTimeWarning',
      name: 'overTimeWarning',
      icon: 'stats-bars',
      component: overTimeWarning,
      meta: { activeMenu: 'overTimeWarning', title: '超时预警' }
    },
    {
      path: 'overQuantityWarning',
      name: 'overQuantityWarning',
      icon: 'stats-bars',
      component: overQuantityWarning,
      meta: { activeMenu: 'overQuantityWarning', title: '超量预警' }
    }
  ]
}
containerPlatformRouter.children.push(containerManagementRouter)
/* 集装箱管理 3.0 end */

/* 集装箱管理 star */
let containerSourceRouter = {
  path: 'containerSource',
  name: 'containerSource',
  redirect: 'containerSource/container_platform_container_list',
  icon: 'android-list',
  meta: { activeMenu: 'containerManagement', title: '集装箱管理' },
  component: {
    render (c) {
      return c('router-view')
    }
  },
  children: [
    { path: 'container_platform_container_list', name: 'containerPlatformContainerList', icon: 'stats-bars', component: containerPlatformContainerList, meta: { activeMenu: 'containerPlatformContainerList', title: '箱情观察' } }
  ]
}

containerPlatformRouter.children.push(containerSourceRouter)
/* 集装箱管理 3.0 end */

/* 集装箱报表 star */
let containerReportMenuRouter = {
  path: 'container_report_menu',
  name: 'containerReportMenu',
  redirect: 'container_report_menu/container_report',
  icon: 'android-list',
  meta: { activeMenu: 'containerManagement', title: '集装箱报表' },
  component: {
    render (c) {
      return c('router-view')
    }
  },
  children: [
    { path: 'container_report', name: 'containerReport', icon: 'stats-bars', component: containerReport, meta: { activeMenu: 'containerReport', title: '箱情报表' } }
  ]
}
containerPlatformRouter.children.push(containerReportMenuRouter)
/* 集装箱报表 3.0 end */

routers.push(containerPlatformRouter)
export default routers
